{{$current_author := .}}
<span class="author-name">
{{- if isset . "id" -}}
    {{- range where site.RegularPages "Section" "member" -}}
        {{- if eq $current_author.id .Params.id -}}
            <a href="{{ .Permalink }}">{{- .Params.name -}}</a>
        {{- end -}}
    {{- end -}}

    {{- range where site.RegularPages "Section" "guests" -}}
        {{- if eq $current_author.id .Params.id -}}
            {{- if isset .Params "external_link" -}}
                <a href="{{ .Params.external_link }}">{{- .Params.name -}}</a>
            {{- else -}}
                {{- .Params.name -}}
            {{- end -}}
        {{- end -}}
    {{- end -}}

    {{- range where site.RegularPages "Section" "alumni" -}}
        {{- if eq $current_author.id .Params.id -}}
            {{- if isset .Params "external_link" -}}
                <a href="{{ .Params.external_link }}">{{- .Params.name -}}</a>
            {{- else -}}
                {{- .Params.name -}}
            {{- end -}}
        {{- end -}}
    {{- end -}}
{{- else -}}
    {{- .name -}}
{{- end -}}
</span>